function demo_ge_point_new()%% Demo ge_point
% Example usage of the ge_point function.
%   X, Y should be decimal coordinates (WGS84)
%   Z is altitude in meters
% 'help ge_point' for more info.

n = 3;
d = 1/n;

tmp = linspace(0,d*2*pi,n+1);
t = tmp(1:end-1);

iconStr = 'http://maps.google.com/mapfiles/kml/pal2/icon18.png';

myData = {{'a','b';'c','d'},...
    {'e','f';'g','h'},...
    {'i','j';'k','l'},...
    {'m','n';'o','p'}};

descrCell = {'dfsdf','erfefer','tyhtyh','nbvnvb'};

tStart = {'2009-05-06T19:04:01Z';...
          '2009-05-07T19:04:01Z';...
          '2009-05-08T19:04:01Z'};

tEnd = {'2009-05-07T19:04:01Z';...
        '2009-05-08T19:04:01Z';...
        '2009-05-09T19:04:01Z'};


kmlStr01 = ge_point_new(sin(t),cos(t),0,...
                        'iconURL',iconStr,...
                        'name','point1');

                    
kmlStr02 = ge_point_new(sin(d*2*pi+t),cos(d*2*pi+t),0,...
                        'iconURL',iconStr,...
                        'iconColor','FF00FF00',...
                        'pointDataCell',myData,...
                        'name','point2');
                    
kmlStr03 = ge_point_new(0,0,0,...
            'iconURL',iconStr,...
            'iconColor','FFFF0000',...
            'description','',...
            'name','point3');
        
kmlStr04 = ge_point_new(sin(2*d*2*pi+t),cos(2*d*2*pi+t),0,...
            'iconURL',iconStr,...
            'iconColor','FF0080FF',...
            'description',descrCell,...
                  'name','point4');
        
% kmlStr05 = ge_point(1.5*sin(n*t),1.5*cos(n*t),0,...
%             'iconURL',iconStr,...
%             'iconColor','FF0000FF',...
%             'description',descrCell,...
%             'timeSpanStart',tStart,...
%             'timeSpanStop',tEnd);
        

ge_output('demo_ge_point_new.kml',ge_folder('points',[kmlStr01,kmlStr02,kmlStr03,kmlStr04]));
